package com.zatech.cgnci.project.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zatech.cgnci.project.dto.*;
import com.zatech.cgnci.project.entity.CgnciEndorsementDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zatech.cgnci.project.vo.ApprovalRecordVO;
import com.zatech.cgnci.project.vo.CgnciEndorsementInsurancePageVO;
import com.zatech.cgnci.project.vo.CgnciEndorsementInsuranceVO;

import java.util.List;

/**
 * <p>
 * 批改主表 服务类
 * </p>
 *
 * @author Generator
 * @since 2024-12-17
 */
public interface CgnciEndorsementService extends IService<CgnciEndorsementDO> {

    IPage<CgnciEndorsementInsurancePageVO> pageEndorsementInsurance(CgnciEndorsementInsuranceQueryDTO queryDTO);

    CgnciEndorsementInsuranceVO detail(Long endorsementId, String type);

    /**
     *
     * @param updateDTO
     * @param type       1-保单，2-分人，3-分出
     */
    void updateEndorsementInsurance(CgnciEndorsementInsuranceSaveOrUpdateDTO updateDTO, String type);

    void submit(FlowTaskSubmitDTO flowTaskDTO);

    void approve(FlowTaskApprovalDTO flowTaskDTO);

    void back(FlowTaskBackDTO flowTaskDTO);

    void signOut(Long endorsementId);

    List<ApprovalRecordVO> log(Long endorsementId);

    void nextInsuranceCreate(CgnciEndorsementInsuranceNextCreateDTO addCreateDTO, Long endorsementId);

    void nextDivideInCreate(CgnciEndorsementInsuranceNextCreateDTO addCreateDTO, Long endorsementId);

    void nextDivideOutCreate(CgnciEndorsementInsuranceNextCreateDTO addCreateDTO, Long endorsementId);

    Boolean isEndorsement(Long insuranceId);
}
